package ch.jamme.conf;

import java.lang.reflect.*;

/**
 * Defines a strategy to decide if a given field should be ignored during tha marshall phase
 * and then omitted from the produced XML.
 * @author Mario Fusco
 */
public interface FieldSuppressionStrategy {

	/**
	 * Returns true if the marshall of the given field should be skipped
	 * @param field The field that's going to be marshalled
	 * @return True if the marshall of the given field should be skipped
	 */
	boolean suppressField(Field field);

	/**
	 * Returns true if the marshall of the given field having the given value for the object currently parsed should be skipped
	 * @param field The field that's going to be marshalled
	 * @param value The value of the field for the object currently parsed
	 * @return True if the marshall of the given field should be skipped
	 */
	boolean suppressField(Field field, Object value);
}
